<template>
  <div>
    <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
      <h3 class="box">你刷新了:{{ num }}</h3>
    </van-pull-refresh>
  </div>
</template>
<script>
export default {
  data () {
    return {
      num: 0,
      isLoading: false
    }
  },
  methods: {
    onRefresh () {
      setTimeout(() => {
        this.num++
        this.isLoading = false
      }, 2000)
    }
  }
}
</script>
<style lang="less" scoped>
.box {
  height: 300px;
}
</style>
